home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / NextAnswers / 1181_linking_libraries.rtf < prev    next >
Text File  |  1995-06-12  |  2KB  |  43 lines

  1. {\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f1\fmodern Courier;\f2\fmodern Ohlfs;}
  2. \paperw13040
  3. \paperh10200
  4. \margl120
  5. \margr120
  6. {\colortbl;\red0\green0\blue0;}
  7. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\tx5860\tx6400\tx6920\tx7460\tx8000\tx8540\f0\b0\i0\ulnone\fs28\fc0\cf0 Q:  How can I tell 
  8. \pard\fc0\cf0 InterfaceBuilder
  9. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\tx5860\tx6400\tx6920\tx7460\tx8000\tx8540\fc0\cf0  to link against more libraries?\
  10. \
  11. A:  In 
  12. \b Release 2
  13. \b0 , this is easy. Select Other libs in the Project inspector, and click Add...  A panel opens allowing you to add a library.  InterfaceBuilder lists added libraries in alphabetical order in the Project Inspector's browser.  If necessary, you can change their order by control-dragging the library names.  If the Library doesn't reside in /usr/lib you also have to add a Makefile.preamble file to the project with the variable OTHER_LIBS set to the library's directory. For example\
  14. \
  15.  
  16. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f1\fs24\fc1\cf1     OTHER_LIBS = -L/OtherLibsDir\
  17.  
  18. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\tx5860\tx6400\tx6920\tx7460\tx8000\tx8540\f0\fs28\fc0\cf0 \
  19. In 
  20. \b Release 1
  21. \b0 , you need to have a file called Makefile.preamble in addition to the Makefile.  In this file, assign a value to the variable OTHER_LIBS.  For example:\
  22. \
  23.  
  24. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f1\fs24\fc1\cf1     OTHER_LIBS = -ltext\
  25.  
  26. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\tx5860\tx6400\tx6920\tx7460\tx8000\tx8540\f0\fs28\fc0\cf0 \
  27. The value of LIBS will be the library listed above plus NeXT_s and sys_s, which are linked in by the Makefile.\
  28. \
  29. In 
  30. \b Release 3
  31. \b0 , first open your project folder (PB.project) via ProjectBuilder, then select the Libraries folder. \
  32. Select Add from the Files menu.  A panel opens allowing you to add a Library.  Note that you also need to add a Makefile.preamble with the OTHER_LIBS option to your project as described for 
  33. \b Release 2
  34. \b0 ,  if your Library doesn't reside in /usr/lib.\
  35. \
  36. QA269\
  37. \
  38.  
  39. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc0\cf0 Valid for 1.0, 2.0, 3.0\
  40.  
  41. \pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\tx5860\tx6400\tx6920\tx7460\tx8000\tx8540\fc0\cf0 \
  42.  
  43.